/**
 * 
 */
package edu.sjtu.seda.event;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.UUID;

import edu.sjtu.seda.stage.Stage;

/**
 * @author john.zhu
 *
 */
public abstract class Event implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1199695105032865844L;
	
	protected String UID = UUID.randomUUID().toString();
	
	protected LinkedList<Stage> location = new LinkedList<Stage>();
	
	private STATUS status;
	
	public Stage nextLocation(){
		if(location!=null&&!location.isEmpty()){
			return location.pop();
		}
		return null;
	}
	
	public void pushLocation(Stage locationEle){
		location.add(locationEle);
	}
	
	public String getUID(){
		return this.UID;
	}
	
	public enum STATUS{
		START,
		REJECTED,
		FINISH
	}

	public STATUS getStatus() {
		return status;
	}

	public void setStatus(STATUS status) {
		this.status = status;
	}
}
